﻿@if (Request.IsAuthenticated)
{
    <text>
    @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-form navbar-right" }))
    {
        @Html.AntiForgeryToken()
        <a class="form-control" href="javascript:document.getElementById('logoutForm').submit()">Đăng xuất</a>
    }
    </text>
    <p class="navbar-text navbar-right">
        Xin chào: @Html.ActionLink(@User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "navbar-link", title = "Manage" })! 
        @*@Html.ActionLink("Đăng xuất", "LogOff", "Account", routeValues: null, htmlAttributes: new {@class = "navbar-link", id = "logoutLink" })*@
    </p>

}
else
{
    <ul class="nav navbar-nav navbar-right">
        <li>@Html.ActionLink("Đăng ký", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Đăng nhập", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
